package com.woniuxy.platform.app.apiImpl;

import com.woniuxy.cloud.mall95.log.Log;
import com.woniuxy.platform.client.UserManageClient;
import com.woniuxy.platform.client.param.AddUserParam;
import com.woniuxy.platform.service.PlatformUserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import result.Result;

import javax.annotation.Resource;
import javax.validation.Valid;

@RestController
@RequestMapping("/platform")
public class UserManageClientImpl implements UserManageClient {

    @Resource
    private PlatformUserService platformUserService;

    @Override
    @Log("平台账号添加")
    public Result addUser(@Valid AddUserParam param) {
        platformUserService.addUser(param.getAccount(),param.getPassword());
        return Result.success();
    }



}
